<template>
  <div class="imgs-box">
    
      <vue-preview :slides="images" @close="handleClose"></vue-preview>
    
  </div>
</template>
<script>
export default {
  data() {
    return {
      id: this.$route.params.id,
      images: []
    };
  },
  created() {
    this.fn();
  },
  methods: {
    fn() {
      this.$http.get("api/getthumimages/" + this.id).then(res => {
        res.body.message.forEach(val => {
          val.msrc = val.src;
          val.w = 600;
          val.h = 400;
        });
        this.images = res.body.message;
      });
    },
    handleClose() {}
  }
};
</script>
<style lang="less">
    
    figure {
    float: left;
    width: 33.33%;
    margin: 0;
    padding: 4px;
    img {
      width: 100%;
    }
    
}


</style>


